package com.demo.java.disruptor.netty.common;

import com.lmax.disruptor.WorkHandler;

public abstract class AbstractConsumer implements WorkHandler<TranslatorDataWrap> {
    public abstract void postOnEvent(TranslatorDataWrap translatorDataWrap);
    public void onEvent(TranslatorDataWrap translatorDataWrap) throws Exception {
        TranslatorData data = translatorDataWrap.getData();
        //System.out.println("=== consumer, name: "+ data.getName() + ", msg: " + data.getMsg());
        this.postOnEvent(translatorDataWrap);
    }
}
